/*
 * Application.java
 *
 * Created on 13. Dezember 2008, 14:35
 */
 
package de.swta;           

import de.swta.components.category.Category;
import de.swta.components.category.CategoryManager;
import de.swta.components.unit.Unit;
import de.swta.components.unit.UnitManager;
import org.apache.wicket.protocol.http.WebApplication;
/** 
 *
 * @author JKorreck
 * @version 
 */

public class Application extends WebApplication {

    public Application() {
        MyItemManager.getInstance().addItem(new MyItem("01B", "Fisch", "Fischstaebchen", 100, "Gramm", 1.96f));
        MyItemManager.getInstance().addItem(new MyItem("02A", "Gemüse", "Moehren", 100, "Gramm", 2.96f));
        MyItemManager.getInstance().addItem(new MyItem("02B", "Fisch", "Scholle", 12, "Gramm", 3.97f));
        MyItemManager.getInstance().addItem(new MyItem("01C", "Fleisch", "Rinderhack", 250, "Kilogramm", 234.98f));

        MyItemManager.getInstance().getItem("01B").setCount(13);
        MyItemManager.getInstance().getItem("02A").setCount(8);
        MyItemManager.getInstance().getItem("02B").setCount(12);
        MyItemManager.getInstance().getItem("01C").setCount(4);


        CategoryManager.getInstance().addCategory(new Category("Fisch"));
        CategoryManager.getInstance().addCategory(new Category("Fleisch"));
        CategoryManager.getInstance().addCategory(new Category("Gemüse"));
        CategoryManager.getInstance().addCategory(new Category("Süßwaren"));
        CategoryManager.getInstance().addCategory(new Category("Backwaren"));


        UnitManager.getInstance().addUnit(new Unit("Kilogramm"));
        UnitManager.getInstance().addUnit(new Unit("Gramm"));
        UnitManager.getInstance().addUnit(new Unit("Liter"));
        UnitManager.getInstance().addUnit(new Unit("Milliliter"));
        UnitManager.getInstance().addUnit(new Unit("Stück"));
//        MyItemManager.getInstance().addItem(new MyItem("01sB", "Fisch", "Fischstaebchen", 100, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("02dA", "Gemüse", "Moehren", 100, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("02rB", "Fisch", "Scholle", 12, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("01ljC", "Fleisch", "Rinderhack", 250, "Kilogramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("01lkB", "Fisch", "Fischstaebchen", 100, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("02fghA", "Gemüse", "Moehren", 100, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("02ertB", "Fisch", "Scholle", 12, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("01345C", "Fleisch", "Rinderhack", 250, "Kilogramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("031B", "Fisch", "Fischstaebchen", 100, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("02rA", "Gemüse", "Moehren", 100, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("02345B", "Fisch", "Scholle", 12, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("017C", "Fleisch", "Rinderhack", 250, "Kilogramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("0jh1B", "Fisch", "Fischstaebchen", 100, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("02fhA", "Gemüse", "Moehren", 100, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("02rtzB", "Fisch", "Scholle", 12, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("01fbC", "Fleisch", "Rinderhack", 250, "Kilogramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("01ggB", "Fisch", "Fischstaebchen", 100, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("02bbA", "Gemüse", "Moehren", 100, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("02hhB", "Fisch", "Scholle", 12, "Gramm", 1.96f));
//        MyItemManager.getInstance().addItem(new MyItem("01uuC", "Fleisch", "Rinderhack", 250, "Kilogramm", 1.96f));


        MyItemPackage package1 = new MyItemPackage("123", "Familien Paket");
        package1.addItem("01C", 1);
        package1.addItem("02B", 12);
        MyItemPackageManager.getInstance().addItemSet(package1);

        MyItemPackage package2 = new MyItemPackage("124", "Mittagstisch");
        package2.addItem("01C", 2);
        package2.addItem("02A", 12);
        MyItemPackageManager.getInstance().addItemSet(package2);

        package2.setReserved(true);
    }

    public Class getHomePage() {
        
        return StartPage.class;
    }
}
